import request from "../http/axios";

export function listMonitor() {
  return request({
    url: "/measuring_points",
    method: "get",
  });
}
export function initRealtime() {
  return request({
    url: "/init/realtime_data",
    method: "get",
  });
}
export function fzSet(data) {
  return request({
    url: "/querytings/alarm-limits",
    method: "post",
    params: data,
  });
}

export function getHistoryChart(params, queryStr) {
  return request({
    url: "/history/curve?" + queryStr,
    method: "post",
    params: params,
  });
}
// 导出
export function exportExcel(params, queryStr) {
  return request({
    url: "/history/download?" + queryStr,
    method: "post",
    params: params,
  });
}
// 历史报警
export function listAlarm(params) {
  return request({
    url: "/history/alarm",
    method: "post",
    params: params,
  });
}

// 历史视频
export function listVideo(params) {
  return request({
    url: "/history/videos",
    method: "post",
    params: params,
  });
}
// export function getVideoSrc(params) {
//   return request({
//     url: "/history/videos/"+params,
//     method: "get",
//   })
// }
export function exportVideo(vname) {
  return request({
    url: "/history/download/" + vname,
    method: "get",
  });
}

//燃料检测数据初始化
export function initFuel(params) {
  return request({
    url: "/fuel/init",
    method: "get",
    params: params,
  });
}

// 获取最近一次阈值
export function valueFz() {
  return request({
    url: "/init/alarm-limits",
    method: "post",
  });
}

//历史云图
export function cloud(data) {
  return request({
    url: "/history/cloud",
    method: "post",
    params: data,
  });
}
